<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="ajax" uri="javawebparts/ajaxparts/taglib"%>

<s:form action="%{action}" method="post" theme="simple" id="form">
<s:hidden name="engineManagement" value="%{engineManagement}"></s:hidden>
<s:hidden name="user.active" value="%{user.active}" ></s:hidden>
<s:hidden name="userId" value="%{userId}" ></s:hidden>
<s:hidden name="adminaction" value="%{adminaction}" ></s:hidden>
	<table width="100%">
		<tr>
			<td class="verdana12blacknormal">
				<div class="sectionheading bottom-border" style="margin: 0px 0px 0px 0px">

						Manage User Registration Information

				</div>
				<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
				<div style="margin: 0px 0px 12px 0px" class="common-text">

					Fields marked with an asterisk (*) MUST be entered with the
					appropriate information in order to be processed. You will be able
					to use your ID user and password to manage your account.
			</td>
		</tr>
		<tr>
			<td>
				<table class="common-text">
					<tr>
						<td>
							&nbsp;
						</td>
						<td>
							<s:actionerror cssClass="note-red" />
							<s:fielderror cssClass="note-red" />
							<s:actionmessage cssClass="error-text" />
						</td>
					</tr>
					<tr>
						<td align="right" class="verdana12blacknormal">
							User ID :
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:if test="#session.Admin == null">
											<s:textfield cssClass="textfield" theme="simple"
												name="user.userId" value="%{user.userId}" label="User ID" readonly="true"
												maxlength="50" />
										</s:if>
										<s:else>
											<s:textfield cssClass="textfield" theme="simple"
												name="user.userId" value="%{user.userId}" label="User ID"
												maxlength="50" readonly="true"/>
										</s:else>

									</td>
									<td class="verdana11greyNormal">
										* Minimum 3 characters, maximum 50, use only characters A-Z,
										a-z, 1-9, ., _, -.
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Password :
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:password cssClass="textfield" theme="simple"
											name="user.password" value="%{user.password}"
											showPassword="true" label="Password" maxlength="12" readonly="true" />

									</td>

									<td class="verdana11greyNormal">
										* Please choose a password easy for you to remember. minimum 4
										letters.
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal"  width="17%">
							Confirm Password :
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:password cssClass="textfield" theme="simple"
											name="confirmPassword" value="%{user.password}"
											showPassword="true" label="Confirm Password" readonly="true" />

									</td>
									<td class="verdana11greyNormal">
										* Must be the same as above
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="verdana12blacknormal">
							Email :
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.email" value="%{user.email}" label="Email" readonly="true" />
									</td>

									<td class="verdana11greyNormal">
										* Must be a valid email address.
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							First name :
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.firstName" value="%{user.firstName}"
											label="First name" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Last name :
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.lastName" value="%{user.lastName}"
											label="Last name" />

									</td>
									<td class="verdana11greyNormal">*</td>

								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Company:
						</td>
						<td>
							<table>

								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.company" value="%{user.company}" label="Company" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Job title:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.jobTitle" value="%{user.jobTitle}"
											label="Job title" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<!--Region_Form:Region_List-->
					<tr>
						<td align="right"  class="verdana12blacknormal">
							Region:
						</td>

						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" cssClass="textfield"
											headerValue="Select Region" headerKey="0"
											name="user.region.categoryId"
											value="%{user.region.categoryId}" id="region"
											list="regionList" listKey="categoryId" listValue="categoryName"></s:select>
										<ajax:event ajaxRef="RegistrationForm/showCountryChange" />

									</td>
									<td class="verdana11greyNormal">*</td>

								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right"  class="verdana12blacknormal">
							Country:
						</td>

						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" cssClass="textfield"
												headerValue="Select Country" headerKey="0"
												name="user.country.categoryId"
												value="%{user.country.categoryId}" id="country"
												list="countryList" listKey="categoryId" listValue="categoryName"></s:select>
											<ajax:event ajaxRef="RegistrationForm/showStateChange" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right"  class="verdana12blacknormal">
							State:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" name="user.state.categoryId"
												cssClass="textfield" headerKey="0" id="state"
												headerValue="Select State" value="%{user.state.categoryId}"
												list="stateList" listKey="categoryId" listValue="categoryName" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							City:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.city" value="%{user.city}" label="City" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>

							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="verdana12blacknormal">
							Zip:
						</td>
						<td>
							<table>
								<tr>

									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.zip" value="%{user.zip}" label="Zip" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Street:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.street" value="%{user.street}" label="Street" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Language:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" name="user.languages.languageCode"
											list="languageList" listKey="languageCode"
											listValue="languageName" cssClass="textfield"
											value="%{user.languages.languageCode}" />
									</td>

									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Phone:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.phone" value="%{user.phone}" label="Phone" />

									</td>
									<td class="verdana11greyNormal">*</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Mobile:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.mobile" value="%{user.mobile}" label="Mobile" />
									</td>
									<td></td>
								</tr>

							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="verdana12blacknormal">
							Fax:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.fax" value="%{user.fax}" label="Fax" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Web Site Address:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.webSiteAddress" value="%{user.webSiteAddress}"
											label="Web site address" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Promotional Code:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.promotionalCode" value="%{user.promotionalCode}"
											label="Promotional code" />
									</td>
									<td  class="verdana11greyNormal">
										Promotional priority code, please enter it.
									</td>
								</tr>

							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="verdana12blacknormal">
							Number Format:
						</td>
						<td>
							<table>
								<tr>

									<td>
										<s:select theme="simple" name="user.numberFormat.id"
											list="numberFormatList" listKey="id" listValue="sample"
											cssClass="textfield" value="%{user.numberFormat.id}" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							Date Format:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" name="user.dateFormat.id"
											list="dateFormatList" listKey="id" listValue="format"
											cssClass="textfield" value="%{user.dateFormat.id}" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right"  class="verdana12blacknormal">
							User Time Zone:
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:if test="#session.Admin != null">
											<s:select theme="simple" name="user.timezones.id"
												list="timezoneList" listKey="id" cssClass="textfield"
												listValue="timezoneLocation" value="%{user.timezones.id}" />
										</s:if>
										<s:else>
											<s:select theme="simple" name="user.timezones.id"
												list="timezoneList" listKey="id" cssClass="textfield"
												listValue="timezoneLocation" value="%{timezoneId}" />
										</s:else>
									</td>

									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="verdana12blacknormal">
							VAT ID:
						</td>
						<td>
							<table>
								<tr>

									<td>
										<div id="txtVat">
											<s:textfield cssClass="textfield" theme="simple"
												name="user.vatidnr1" value="%{user.vatidnr1}"
												label="VAT-ID Nr." />
											<s:textfield cssClass="textfield" theme="simple"
												name="user.vatidnr2" value="%{user.vatidnr2}" label="" />
										</div>
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right" class="verdana12blacknormal">
							Balance:
						</td>
						<td>
							<table>
								<tr>

									<td>
										<div id="txtVat">
											<s:textfield cssClass="textfield" theme="simple"
												name="user.currentBalance" value="%{user.currentBalance}"
												label="Balance" />
										</div>
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<table class="common-text">
					<tr>
						<td>
							<table>
								<tr>
									<td>
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td>
													<br>
													<s:submit theme="simple" type="image" src="../Admin-Images/submit-btn.gif" value="Submit" name="submit" />
													<img style="cursor: pointer;"
														onclick="document.getElementById('form').reset();"
														src="../Admin-Images/reset-button.gif" alt="Reset" title="Reset">
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<ajax:enable />
	<s:hidden name="user.id" value="%{user.id}" />
	<s:hidden name="referal" value="%{referal}" />
</s:form>